package Model2HomeWork;

//手机卡类 特征：卡类型、卡号、用户名、密码、账户余额、通话时长(分钟)、上网流量 行为：显示（卡号 + 用户名 + 当前余额）

public class PhoneCard {
    private String cardType;
    private int cardNumber;
    private String account;
    private String password;
    private double balance;
    private double time;
    private double network;

    public PhoneCard() {
    }

    public PhoneCard(int cardNumber, String account, double balance) {
        this.cardNumber = cardNumber;
        this.account = account;
        this.balance = balance;
    }
    //打印电话卡信息
    public void showPhoneCards(){
        System.out.println("卡号：" + getCardNumber() + "\n" +
                "用户名：" + getAccount() +
                "当前余额：" + getBalance());
    }
    //getter and setter
    public String getCardType() {
        return cardType;
    }


    public int getCardNumber() {
        return cardNumber;
    }

    public String getAccount() {
        return account;
    }

    public String getPassword() {
        return password;
    }

    public double getBalance() {
        return balance;
    }

    public double getTime() {
        return time;
    }

    public double getNetwork() {
        return network;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public void setCardNumber(int cardNumber) {
        this.cardNumber = cardNumber;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public void setTime(double time) {
        this.time = time;
    }

    public void setNetwork(double network) {
        this.network = network;
    }
}
